<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>基本Bootstrap的强大jQuery表单验证插件</title>
		
		<link rel="stylesheet" href="components/bjv/vendor/bootstrap/css/bootstrap.css"/>
		<link rel="stylesheet" href="components/bjv/dist/css/formValidation.css"/>
		<link rel="stylesheet" type="text/css" href="components/bjv/css/default.css">
		
		<script type="text/javascript" src="components/bjv/vendor/jquery/jquery.min.js"></script>
		<script type="text/javascript" src="components/bjv/vendor/bootstrap/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="components/bjv/dist/js/formValidation.js"></script>
		<script type="text/javascript" src="components/bjv/dist/js/framework/bootstrap.js"></script>
		<script type="text/javascript" sdrc="components/bjv/dist/js/language/zh_CN.js"></script>

	</head>
	<body>
		<div class="htmleaf-container">
			<div class="container">
				<div class="row">
					<section>
						<div class="page-header">
							<h1>基于Bootstrap的强大jQuery表单验证插件</h1>
						</div>
						
						<div class="col-lg-8 col-lg-offset-2">
							<form id="defaultForm" method="post" class="form-horizontal">
								<fieldset>
									<legend>非空校验</legend>
									<div class="form-group">
										<label class="col-lg-3 control-label">用户名</label>
										<div class="col-lg-5">
											<input type="text" class="form-control" name="username" />
										</div>
									</div>
								</fieldset>
								
								<div class="form-group">
									<div class="col-lg-9 col-lg-offset-3">
										<button type="submit" class="btn btn-primary">提交表单</button>
									</div>
								</div>
							</form>
						</div>
					</section>
				</div>
			</div>
		</div>
		
	<script type="text/javascript" src="components/bjv/vendor/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="components/bjv/vendor/bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="components/bjv/dist/js/formValidation.js"></script>
    <script type="text/javascript" src="components/bjv/dist/js/framework/bootstrap.js"></script>
    <script type="text/javascript" sdrc="components/bjv/dist/js/language/zh_CN.js"></script>

	<script type="text/javascript">
		$().ready(function(){
			$('#defaultForm').formValidation({
				message: ' This value is not valid',
				icon: {
					valid: 'glyphicon glyphicon-ok',
					invalid: 'glyphicon glyphicon-remove',
					validating: 'glyphicon glyphicon-refresh'
				},
				fields: {
					username: {
						message: '用户名无效',
						validators: {
							notEmpty: {
								message: '用户名必须填写, 不能为空!'
							}
						}
					}
				}
			});
		})
	</script>

	</body>
</html>
